package cwb1;

import javax.mail.Session;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.datastore.EntityNotFoundException;

import cwb1.UserRegistry;

public class plotServlet extends HttpServlet
{
	
	public long[] getAPTime (String userId) {
		try {
			User user = UserRegistry.getInstance().get(userId);
			GraphEngine graphEngine = GraphEngine.getInstance();
			long [] data = graphEngine.getActivityVSPause(user, ActivityFactory.STUDY);
			return data;
		}
		catch (EntityNotFoundException e) {
			return null;
		}
	}
	
}